package com.ruoyi.zsyh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zsyh.mapper.ZsyhServiceOrderSettlementMapper;
import com.ruoyi.zsyh.domain.ZsyhServiceOrderSettlement;
import com.ruoyi.zsyh.service.IZsyhServiceOrderSettlementService;
import com.ruoyi.common.core.text.Convert;

/**
 * 工单结算信息Service业务层处理
 * 
 * @author yuexl
 * @date 2022-09-09
 */
@Service
public class ZsyhServiceOrderSettlementServiceImpl implements IZsyhServiceOrderSettlementService 
{
    @Autowired
    private ZsyhServiceOrderSettlementMapper zsyhServiceOrderSettlementMapper;

    /**
     * 查询工单结算信息
     * 
     * @param id 工单结算信息ID
     * @return 工单结算信息
     */
    @Override
    public ZsyhServiceOrderSettlement selectZsyhServiceOrderSettlementById(String id)
    {
        return zsyhServiceOrderSettlementMapper.selectZsyhServiceOrderSettlementById(id);
    }

    /**
     * 查询工单结算信息列表
     * 
     * @param zsyhServiceOrderSettlement 工单结算信息
     * @return 工单结算信息
     */
    @Override
    public List<ZsyhServiceOrderSettlement> selectZsyhServiceOrderSettlementList(ZsyhServiceOrderSettlement zsyhServiceOrderSettlement)
    {
        return zsyhServiceOrderSettlementMapper.selectZsyhServiceOrderSettlementList(zsyhServiceOrderSettlement);
    }

    /**
     * 新增工单结算信息
     * 
     * @param zsyhServiceOrderSettlement 工单结算信息
     * @return 结果
     */
    @Override
    public int insertZsyhServiceOrderSettlement(ZsyhServiceOrderSettlement zsyhServiceOrderSettlement)
    {
        zsyhServiceOrderSettlement.setCreateTime(DateUtils.getNowDate());
        return zsyhServiceOrderSettlementMapper.insertZsyhServiceOrderSettlement(zsyhServiceOrderSettlement);
    }

    /**
     * 修改工单结算信息
     * 
     * @param zsyhServiceOrderSettlement 工单结算信息
     * @return 结果
     */
    @Override
    public int updateZsyhServiceOrderSettlement(ZsyhServiceOrderSettlement zsyhServiceOrderSettlement)
    {
        return zsyhServiceOrderSettlementMapper.updateZsyhServiceOrderSettlement(zsyhServiceOrderSettlement);
    }

    /**
     * 删除工单结算信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZsyhServiceOrderSettlementByIds(String ids)
    {
        return zsyhServiceOrderSettlementMapper.deleteZsyhServiceOrderSettlementByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除工单结算信息信息
     * 
     * @param id 工单结算信息ID
     * @return 结果
     */
    @Override
    public int deleteZsyhServiceOrderSettlementById(String id)
    {
        return zsyhServiceOrderSettlementMapper.deleteZsyhServiceOrderSettlementById(id);
    }
}
